import request from "@/utils/request";
import { TeacherInfo } from "@/types/teacher";
const baseApi = '/teacher'

/**
 * 教师保存个人信息
 */
export function saveInfoApi(data: TeacherInfo) { 

return request({
  url: baseApi+'/home/saveInfo',
  method: 'put',
  data
})
}

/**
 * 获取教师个人信息
 */
export function getInfoApi() { 
return request({
  url: baseApi+'/home/info',
  method: 'get'
})
}

/**
 * 统计班级总数、题库总数、试题总数、试卷总数、
 * 学生总数
 */
export function getStatisticsApi() { 
return request({
  url: baseApi+'/home/statistics',
  method: 'get'
})
}

/**
 * 统计班级人数分布
 */
export function getClassDistributionApi() { 
return request({
  url: baseApi+'/home/statistics/grade',
  method: 'get'
})
}

/**
 * 统计各班级考试
 */
export function getExamDistributionApi() { 
return request({
  url: baseApi+'/home/statistics/exam',
  method: 'get'
})
}